<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>浮动</title>
    <style>
        body,div {
            margin: 0;
            padding: 0;
        }
        div {
            float: left;
            margin: 6px;
            bovrder: 1px solid red;
        }
        .box1 {
            width: 100px;
            height: 100px;
        }
        .box2 {
            line-height: 30px;
            font-size: 30px;
        }
        .box3 {
            line-height: 100px;
            font-size: 30px;
        }
    </style>
</head>
<body>
    <div class="box1">box 1</div>
    <div class="box2">box 2</div>
    <div class="box3">box 3</div>
    <div class="box4"><img src="src/1.png" alt=""></div>
    <div class="box5">box 5</div>
    <div class="box6">box 6</div>
</body>
</html>